package util.components.buttons;

import patterns.Command;
import util.CreateJanelaInterna;
import view.JanelaPrincipal;

public class JButtonMenu extends javax.swing.JButton implements Command{

	private int menu_index, submenu_index;
	private JanelaPrincipal janela;

	public JButtonMenu(JanelaPrincipal j, int menu, int submenu, String caption){
		super(caption);

		this.janela = j;
		this.menu_index = menu;
		this.submenu_index = submenu;
	}

	public void execute() {
		CreateJanelaInterna.create(janela, menu_index, submenu_index);
	}
}
